package com.troila.cloud.simplify.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.troila.cloud.simplify.model.WechatUserAccount;
import com.troila.cloud.simplify.repository.WechatUserAccountRepository;

@Service
@Transactional
public class WechatUserAccountService {
	
	@Autowired
	private WechatUserAccountRepository wechatUserAccountRepository;
	
	public WechatUserAccount save(WechatUserAccount wechatUserAccount){
		return wechatUserAccountRepository.save(wechatUserAccount);
	}
	
	public WechatUserAccount findByWxid(String wxid){
		return wechatUserAccountRepository.findByWxid(wxid);
	}
	
	public WechatUserAccount findById(int id){
		return wechatUserAccountRepository.findOne(id);
	}

}